﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PropertiesWC.ascx.cs"
    Inherits="MadeInPortugalWebApplication.WebControl.PropertiesWC" %>
<section id="page">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
    <Triggers>
        <asp:PostBackTrigger ControlID="ddlType" />
        <asp:PostBackTrigger ControlID="ddlTag" />
    </Triggers>
    <ContentTemplate>

        <span>
            <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
            </asp:DropDownList>
        </span>
       <span>
            <asp:DropDownList ID="ddlTag" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlTag_SelectedIndexChanged">
            </asp:DropDownList>
        </span>
        <span>
           <asp:DropDownList ID="ddlLanguage" runat="server">
               <asp:ListItem>English</asp:ListItem>
           </asp:DropDownList>
       </span>
       <div class="feedback">
           <div runat="server" id="feedbackPanel">
           </div>
       </div>
       <div class="blacklist list">
                <ul class="actions">
                    <li><a href="form.html" class="add addBlackListItemButton"><span><b></b>Adicionar Tipo</span></a></li>
                </ul>
                <div class="feedback">
                    <div runat="server" id="Div1">
                    </div>
                </div>
                <div class="blackListAddPanel disabled">
                    <h4>
                        Adicionar Tipo</h4>
                    <div class="form">
                        <p>
                            <label class="inline">
                                Termo
                            </label>
                            <asp:TextBox runat="server" ID="tbxTipo" Columns="60" MaxLength="50" />
                        </p>
                        <p class="buttons">
                            <asp:LinkButton CssClass="button" runat="server" ID="lbAddTipo" 
                                onclick="lbAddTipo_Click">
                                <span>Adicionar</span>
                            </asp:LinkButton>
                            <span>ou</span> <a href="#" class="cancel">Cancelar</a>
                        </p>
                        
                    </div>
                </div>

                <asp:GridView ID="TypeGridview" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                    OnRowCommand="TypeGridView_RowCommand" CssClass="matrix" GridLines="None" >
                    <Columns>
                        <asp:TemplateField HeaderText="Número" SortExpression="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbTypeNumber" runat="server" Text='<%# Eval("ID")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Type Name" ItemStyle-CssClass="input">
                            <ItemTemplate>
                                <asp:Label ID="lbTypeTerm" CssClass="value" runat="server" Text='<%# Eval("Type")%>' />
                                <asp:TextBox ID="tbxTypeTerm" runat="server" Text='<%# Eval("Type")%>' Columns="100"
                                    maxlenght="200" />
                            </ItemTemplate>
                            <ItemStyle CssClass="input" />
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="actions" HeaderStyle-CssClass="actions threeactions">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnTypeTermSave" runat="server" CssClass="action save disabled" Text="Guardar" CommandName="saveBlacklist" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />
                                <a href="#" class="action edit">Editar</a>
                                <asp:LinkButton ID="btnTypeTermDelete" runat="server" CssClass="action delete" Text="Eliminar" CommandName="deleteBlacklist" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />
                            </ItemTemplate>
                            <HeaderStyle CssClass="actions threeactions" />
                            <ItemStyle CssClass="actions" />
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>


                <div class="blacklist list">
                <ul class="actions">
                    <li><a href="form.html" class="add addBlackListItemButton1"><span><b></b>Adicionar Tag</span></a></li>
                </ul>
                <div class="feedback">
                    <div runat="server" id="Div2">
                    </div>
                </div>
                <div class="blackListAddPanel1 disabled">
                    <h4>
                        Adicionar Tag</h4>
                    <div class="form">
                        <p>
                            <label class="inline">
                                Tag
                            </label>
                            <asp:TextBox runat="server" ID="tbxTag" Columns="60" MaxLength="50" />
                        </p>
                        <p class="buttons">
                            <asp:LinkButton CssClass="button" runat="server" ID="lblAddTag" onclick="lblAddTag_Click" 
                                >
                                <span>Adicionar</span>
                            </asp:LinkButton>
                            <span>ou</span> <a href="#" class="cancel1">Cancelar</a>
                        </p>
                        
                    </div>
                </div>
                <asp:GridView ID="TagGridview" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                    OnRowCommand="TagGridView_RowCommand" CssClass="matrix" GridLines="None" >
                    <Columns>
                        <asp:TemplateField HeaderText="Número" SortExpression="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbTagNumber" runat="server" Text='<%# Eval("ID")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tag Name" ItemStyle-CssClass="input">
                            <ItemTemplate>
                                <asp:Label ID="lbTagTerm" CssClass="value" runat="server" Text='<%# Eval("TagName")%>' />
                                <asp:TextBox ID="tbxTagTerm" runat="server" Text='<%# Eval("TagName")%>' Columns="100"
                                    maxlenght="200" />
                            </ItemTemplate>
                            <ItemStyle CssClass="input" />
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="actions" HeaderStyle-CssClass="actions threeactions">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnTagSave" runat="server" CssClass="action save disabled" Text="Guardar" CommandName="saveBlacklist" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />
                                <a href="#" class="action edit">Editar</a>
                                <asp:LinkButton ID="btnTagDelete" runat="server" CssClass="action delete" Text="Eliminar" CommandName="deleteBlacklist" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />
                            </ItemTemplate>
                            <HeaderStyle CssClass="actions threeactions" />
                            <ItemStyle CssClass="actions" />
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>


       <div class="blacklist list">
                <%--<h2 class="pageTitle">
                    Properties</h2>--%>
                <ul class="actions">
                    <li><a href="form.html" class="add addBlackListItemButton2"><span><b></b>Adicionar termo</span></a></li>
                </ul>
                
                <div class="blackListAddPanel2 disabled">
                    <h4>
                        Adicionar Propriedade</h4>
                    <div class="form">
                        <p>
                            <label class="inline">
                                Termo
                            </label>
                            <asp:TextBox runat="server" ID="tbxNewTerm" Columns="60" MaxLength="50" />
                        </p>
                        <p class="buttons">
                            <asp:LinkButton CssClass="button" runat="server" ID="btnSaveNewTerm" OnClick="SaveNewTerm_Click">
                                <span>Adicionar</span>
                            </asp:LinkButton>
                            <span>ou</span> <a href="#" class="cancel2">Cancelar</a>
                        </p>
                       <div> </div>
                    </div>
                </div>
<asp:GridView ID="propertiesGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                    OnRowCommand="GridView_RowCommand" CssClass="matrix" GridLines="None" >
                    <Columns>
                        <asp:TemplateField HeaderText="Número" SortExpression="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbNumber" runat="server" Text='<%# Eval("ID")%>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Propriedade" ItemStyle-CssClass="input">
                            <ItemTemplate>
                                <asp:Label ID="lbTerm" CssClass="value" runat="server" Text='<%# Eval("PropertyName")%>' />
                                <asp:TextBox ID="tbxTerm" runat="server" Text='<%# Eval("PropertyName")%>' Columns="100"
                                    maxlenght="200" />
                            </ItemTemplate>
                            <ItemStyle CssClass="input" />
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="actions" HeaderStyle-CssClass="actions threeactions">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnTermSave" runat="server" CssClass="action save disabled" Text="Guardar" CommandName="saveBlacklist" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />
                                <a href="#" class="action edit">Editar</a>
                                <asp:LinkButton ID="btnTermDelete" runat="server" CssClass="action delete" Text="Eliminar" CommandName="deleteBlacklist" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>' />
                            </ItemTemplate>
                            <HeaderStyle CssClass="actions threeactions" />
                            <ItemStyle CssClass="actions" />
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:HiddenField runat="server" ID="HiddenField1" Value="1" />
                <ul id="Ul1">
                    <asp:Repeater runat="server" ID="Repeater1" OnItemCommand="RepeaterChangePage_Command">
                        <HeaderTemplate>
                            <li>Página</li>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li class='<%# DataBinder.Eval(Container.DataItem, "Class") %>'>
                                <asp:LinkButton runat="server" ID="paginationItem" Text='<%# DataBinder.Eval(Container.DataItem, "PageNumber") %>'
                                    CommandName="goPage" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "PageNumber") %>' />
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                

                

       
                <asp:HiddenField runat="server" ID="hfPageNumber" Value="1" />
                <ul id="pagination">
                    <asp:Repeater runat="server" ID="paginationList" OnItemCommand="RepeaterChangePage_Command">
                        <HeaderTemplate>
                            <li>Página</li>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li class='<%# DataBinder.Eval(Container.DataItem, "Class") %>'>
                                <asp:LinkButton runat="server" ID="paginationItem" Text='<%# DataBinder.Eval(Container.DataItem, "PageNumber") %>'
                                    CommandName="goPage" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "PageNumber") %>' />
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>

               </ContentTemplate>
</asp:UpdatePanel>
</section>
